package prictise.com.application1.eunm;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;

public class Test {
  public static void main(String[] args) {
    try {
      Class c = Class.forName("prictise.com.application1.eunm.TestEnum2");
      Method method = c.getDeclaredMethod("values");
      Object o = method.invoke(null);
      Object [] oa = (Object[]) o;
      Object a = oa[0];
      System.out.println(a);
      System.out.println(a.getClass());
      System.out.println("---------------------");
    } catch (ClassNotFoundException | NoSuchMethodException e) {
      e.printStackTrace();
    } catch (IllegalAccessException e) {
      e.printStackTrace();
    } catch (InvocationTargetException e) {
      e.printStackTrace();
    }

    System.out.println(TestEnum2.class);
    System.out.println(TestEnum2.EMOJI);
    TestEnum2[] te = TestEnum2.values();
    System.out.println(te[0]);
    System.out.println(te[0].getClass());

    List<String> seaconList = new ArrayList<>();
    for (TestEnum2 value : TestEnum2.values()) {
      System.out.println(value);
//      String season = value.getSeason();
//      seaconList.add(season);
    }
    System.out.println(seaconList);
  }
}
